]> dgit.raspbian.org Git - gnome-shell.git/commit
windowPreview: Ensure scaling is limited to defined size increase
authorSebastian Keller <skeller@gnome.org>
Sun, 21 Feb 2021 17:38:05 +0000 (18:38 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 24 Feb 2021 09:58:31 +0000 (09:58 +0000)
commitef5b92c5967235299b61116d2ebf4ea83e895ebd
tree9bc39e47b38274bc97bdd009c3e9c05ab5ae083f
parentef777426d2bbc9584fa1d2805280109553105b11
windowPreview: Ensure scaling is limited to defined size increase

The preview was getting scaled up by a factor based on what is needed to
increase the width by activeExtraSize pixels. With windows that are
wider than than they are tall, this means that the size of the window
will not increase any more than activeExtraSize in any direction, but
for windows that are taller than they are wide, the vertical scaling
can exceed this. This would break some of the assumptions in the
reported size for the preview chrome and could for very narrow windows
result in a rather large scale.

To fix this, calculate the scaling factor based on whatever is larger,
the height or the width.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1707>
js/ui/windowPreview.js